<template>
	<view class="content">
		<u-navbar :autoBack="true" bgColor="rgba(0,0,0,0)" :fixed="true" @click-left="$back" ></u-navbar>
		
		<image :src="'/images/qbg_02.png' | formatImgUrl" class="bei" mode="aspectFill"></image>
		<view class="dingbox" :style="{'padding-bottom': paddingBottomHeight + 'rpx'}">
			<view class="neibox">
				<view class="title">
					权限审核<br>
					写手认证须知！
				</view>
				<view class="lvbg">
					<scroll-view scroll-y="true" class="huabox">
						<view class="huatitle">
							接单须知
						</view>
						<view class="txt">
							接单时要与单主互相尊重，平等沟通。记得依据自己的情况标价、结合自身的能力接单。
						</view>
						<view class="huatitle">
							交易须知
						</view>
						<view class="txt">
							在交易前，请和单主确定约稿内容、截稿时间、版权归属等细节，按时交文，不做鸽子！
						</view>
						<view class="huatitle">
							规范须知
						</view>
						<view class="txt">
							不找枪手代写、AI代写、不抄袭、不洗稿、不跑单是每个写手刻在心里的底线！
						</view>
						<view class="huatitle">
							接单提醒
						</view>
						<view class="txt">
							请不要做出《写手违规管理办法》中写明的违规行为，包括但不限于制作、复制、发布含有违法违规有害内容的信息。
						</view>
						<view class="huatitle">
							请勿违规
						</view>
						<view class="txt">
							请勿创作、传播平台限制的题材；与客户进行私下交易；利用dream约文实施诈骗等。
						</view>
						<view class="huatitle">
							未成年提醒
						</view>
						<view class="txt">
							如果写手尚未成年，请不要在没有监护人同意的情况下进行交易。
						</view>
						<view class="huatitle">
							申诉通道
						</view>
						<view class="txt">
							如果发生了自己权益受损或者其他不合理、违法违规的事，请向平台申诉。
						</view>
					</scroll-view>
				</view>
			</view>
			<view class="dibai">
				<view class="addbox" @click="go_true()">
					我已知晓，开始写手权限认证
				</view>
				
			</view>
		</view>
	</view>
</template>
<script>
	export default { 
		data() {
			return {
				paddingBottomHeight: 0, //苹果X以上手机底部适配高度
				writer_apply:undefined,
			}
		},
		onLoad(ops) {
			this.writer_apply = ops.writer_apply
		},
		onShow() {
			this.getUserInfo()
		},
		created() {
		   let that = this;
		   uni.getSystemInfo({
		      success: function(res) {
		         let model = ['X', 'XR', 'XS', '11', '12', '13', '14', '15'];
		         model.forEach(item => {
		            //适配iphoneX以上的底部，给tabbar一定高度的padding-bottom
		            if (res.model.indexOf(item) != -1 && res.model.indexOf('iPhone') != -1) {
		               that.paddingBottomHeight = 40;
		            }
		         })
		      }
		   });
				 var url = getCurrentPages() 
				 this.urlPath = '/' + url[0].route
				 
		},
		methods: {
			getUserInfo() {
				let that = this
				this.$api.default.request('user/userInfo', {}, 'POST', false).then((res) => {
				
					
					if (res.code) {
						
						that.userInfo = res.user
						// this.$db.set('userInfo',res.user)
						
						if(!res.user.membe_id || res.user == null){
							uni.reLaunch({
								url: '/pages/login/login'
							})
							return;
						}
						
						if (res.user.writer_user_config.hasOwnProperty('order_receiving_status')) {
							that.xuan = that.userInfo.writer_user_config.order_receiving_status
						}
					} else {
						that.$common.errorToShow(res.msg)
					}
				})
			},
			go_true(){
				
				if (this.userInfo.writer_apply) {
					this.$go('/pages/user/examine')
				} else {
					this.$go('/pages/user/attestation')
				}
			},
			goMyPage(){
				uni.navigateBack()
			},
			 groupChange(n) {
			        console.log('groupChange', n);
			  },
			  radioChange(n) {
				console.log('radioChange', n);
			  }
		}
	}
</script>

<style lang="scss">
	page {
		background: rgba(242, 245, 242, 1);
	}
	.content {
		position: relative;
		padding: 102rpx 0;
		padding-top: 154px;
		
		.bei{
			width: 100%;
			height: 100vh;
			position: absolute;
			left: 0;
			top: 0;
			z-index: -1;
		}
		.dingbox{
			position: fixed;
			left: 0;
			bottom: 0;
			width: 100%;
			.neibox{
				padding: 0 75rpx;
				margin-top: 200rpx;
				.title{
					font-size: 72rpx;
					font-weight: bold;
					letter-spacing: 0px;
					line-height: 104rpx;
					padding-bottom: 48rpx;
					color: #45C4B0;
				}
				.lvbg{
					border-top-left-radius: 30px;
					border-top-right-radius: 30px;
					height: 740rpx;
					padding-top: 28rpx;
					background: #45C4B0;
					box-shadow: 0px 4px 10px 0px #45C4B0,inset 0px 4px 10px 0px rgba(255, 255, 255, 0.3);
					.huabox{
						padding: 0 48rpx;
						width: 504rpx;
						height: 740rpx;
						.huatitle{
							padding-bottom: 8rpx;
							font-size: 36rpx;
							font-weight: bold;
							line-height: 40rpx;
							letter-spacing: 0px;
							color: #FFFFFF;
						}
						.txt{
							font-size: 24rpx;
							font-weight: normal;
							line-height: 48rpx;
							letter-spacing: 0px;
							color: #FFFFFF;
							padding-bottom: 28rpx;
						}
					}
				}
			}
			.dibai{
				background-color: #FFFFFF;
				padding: 20rpx 60rpx;
				.addbox{
					height: 80rpx;
					border-radius: 8px;
					opacity: 1;
					margin-bottom: 20rpx;
					background: #45C4B0;
					line-height: 80rpx;
					text-align: center;
					font-size: 28rpx;
					font-weight: bold;
					text-align: center;
					letter-spacing: 0em;
					color: #FFFFFF;
				}
				.jujue{
					text-align: center;
					font-size: 28rpx;
					font-weight: bold;
					text-align: center;
					letter-spacing: 0em;
					color: #FFFFFF;
					
				}
			}
		}
		
		.xiebox {
			display: flex;
			align-items: center;
			justify-content: center;
			padding-bottom: 10rpx;
		
			.xietxt {
				font-size: 20rpx;
				font-weight: bold;
				color: #999999;
		
				text {
					font-size: 20rpx;
					font-weight: bold;
					color: #45C4B0;
					padding: 0 10rpx;
				}
			}
		}
			
		
	}
</style>